package com.sky.mapper;/*
@author sun
@date 24/07/19
@project IntelliJ IDEA
*/

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SetmealDishMapper {
    // 根据主键获取id 之后批量插入
    void insertAllSetmeal(List<SetmealDish> setmealId);

    List<Long> getSetmealIdsByDishIds(List<Long> ids);

    @Delete("delete from setmeal_dish where setmeal_id = #{setmealId}") // 根据主表相关联的数据id再删除
    void delSetmealWithSetmeal(Long id);
}
